#include  <cstdio>
#include  <stack>
using namespace std;

int main(int argc, char *argv[])
{
	float a;
	scanf("%f",&a);
	char  s[20];
	int counter = 0;
	do
	{
		counter++;
		a *= 10;
		printf("%f %d\n",a,(int)a);
	}while(a-(int)a != 0);

	stack<int> ctn;
	int b = (int)a;
	while( b != 0 )
	{
		ctn.push(b%10);
		b /= 10;
	}
	int i = 0;
	while( !ctn.empty() )
	{
		if(ctn.size() == counter)
			s[i++] = '.';
		s[i++] = ctn.top() + '0';
		ctn.pop();
	}
	s[i] = '\0';
	printf("%s\n",s);
}
